<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LINE 1 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-1"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Module      :  Graphics.Win32.Control</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Copyright   :  (c) Alastair Reid, 1997-2003</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  :  Esa Ilari Vuokko &lt;ei@vuokko.info&gt;</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- FFI bindings to the various standard Win32 controls.</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Graphics.Win32.Control</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data.Bits</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator">.|.</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.GDI.Types</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">HMENU</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">HWND</span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.Message</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WindowMessage</span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.Window</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">ClassName</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">Pos</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">WindowStyle</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">maybePos</span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.Window</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c_CreateWindowEx</span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">System.IO.Unsafe</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unsafePerformIO</span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">System.Win32.Types</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">HANDLE</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">UINT</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">maybePtr</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">newTString</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">withTString</span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">System.Win32.Types</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">failIfFalse_</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">failIfNull</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">failIfZero</span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Foreign.Ptr</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">nullPtr</span><span class="hs-special">)</span><span class="hs-cpp">

#include &quot;windows_cconv.h&quot;
</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-comment">-- == Command buttons</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-identifier">bS_PUSHBUTTON</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-38"></span><span class="hs-identifier">bS_PUSHBUTTON</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-39"></span><span class="hs-identifier">bS_DEFPUSHBUTTON</span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-40"></span><span class="hs-identifier">bS_DEFPUSHBUTTON</span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-41"></span><span class="hs-identifier">bS_CHECKBOX</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-42"></span><span class="hs-identifier">bS_CHECKBOX</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-43"></span><span class="hs-identifier">bS_AUTOCHECKBOX</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-44"></span><span class="hs-identifier">bS_AUTOCHECKBOX</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">3</span><span>
</span><span id="line-45"></span><span class="hs-identifier">bS_RADIOBUTTON</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-46"></span><span class="hs-identifier">bS_RADIOBUTTON</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-47"></span><span class="hs-identifier">bS_3STATE</span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-48"></span><span class="hs-identifier">bS_3STATE</span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">5</span><span>
</span><span id="line-49"></span><span class="hs-identifier">bS_AUTO3STATE</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-50"></span><span class="hs-identifier">bS_AUTO3STATE</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">6</span><span>
</span><span id="line-51"></span><span class="hs-identifier">bS_GROUPBOX</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-52"></span><span class="hs-identifier">bS_GROUPBOX</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">7</span><span>
</span><span id="line-53"></span><span class="hs-identifier">bS_AUTORADIOBUTTON</span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-54"></span><span class="hs-identifier">bS_AUTORADIOBUTTON</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">9</span><span>
</span><span id="line-55"></span><span class="hs-identifier">bS_OWNERDRAW</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-56"></span><span class="hs-identifier">bS_OWNERDRAW</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">11</span><span>
</span><span id="line-57"></span><span class="hs-identifier">bS_LEFTTEXT</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-58"></span><span class="hs-identifier">bS_LEFTTEXT</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">32</span><span>
</span><span id="line-59"></span><span class="hs-identifier">bS_USERBUTTON</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-60"></span><span class="hs-identifier">bS_USERBUTTON</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-pragma">{-# LINE 51 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-identifier">createButton</span><span>
</span><span id="line-53"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ButtonStyle</span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-55"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-56"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-57"></span><span class="hs-identifier">createButton</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">bstyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">mb_parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateButton&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">buttonStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">bstyle</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_parent</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-identifier">buttonStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-65"></span><span class="hs-identifier">buttonStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;BUTTON&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">ButtonState</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">UINT</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-identifier">bST_CHECKED</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonState</span><span>
</span><span id="line-70"></span><span class="hs-identifier">bST_CHECKED</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-71"></span><span class="hs-identifier">bST_INDETERMINATE</span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonState</span><span>
</span><span id="line-72"></span><span class="hs-identifier">bST_INDETERMINATE</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-73"></span><span class="hs-identifier">bST_UNCHECKED</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ButtonState</span><span>
</span><span id="line-74"></span><span class="hs-identifier">bST_UNCHECKED</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-pragma">{-# LINE 74 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-identifier">checkDlgButton</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ButtonState</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-identifier">checkDlgButton</span><span> </span><span class="hs-identifier">dialog</span><span> </span><span class="hs-identifier">button</span><span> </span><span class="hs-identifier">check</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-77"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-string">&quot;CheckDlgButton&quot;</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_CheckDlgButton</span><span> </span><span class="hs-identifier">dialog</span><span> </span><span class="hs-identifier">button</span><span> </span><span class="hs-identifier">check</span><span>
</span><span id="line-78"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h CheckDlgButton&quot;</span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-identifier">c_CheckDlgButton</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ButtonState</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">Bool</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="hs-identifier">checkRadioButton</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span class="hs-identifier">checkRadioButton</span><span> </span><span class="hs-identifier">dialog</span><span> </span><span class="hs-identifier">first_button</span><span> </span><span class="hs-identifier">last_button</span><span> </span><span class="hs-identifier">check</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-string">&quot;CheckRadioButton&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-identifier">c_CheckRadioButton</span><span> </span><span class="hs-identifier">dialog</span><span> </span><span class="hs-identifier">first_button</span><span> </span><span class="hs-identifier">last_button</span><span> </span><span class="hs-identifier">check</span><span>
</span><span id="line-85"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h CheckRadioButton&quot;</span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-identifier">c_CheckRadioButton</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">Bool</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-identifier">isDlgButtonChecked</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">ButtonState</span><span>
</span><span id="line-89"></span><span class="hs-identifier">isDlgButtonChecked</span><span> </span><span class="hs-identifier">wnd</span><span> </span><span class="hs-identifier">button</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-90"></span><span>  </span><span class="hs-identifier">failIfZero</span><span> </span><span class="hs-string">&quot;IsDlgButtonChecked&quot;</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_IsDlgButtonChecked</span><span> </span><span class="hs-identifier">wnd</span><span> </span><span class="hs-identifier">button</span><span>
</span><span id="line-91"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h IsDlgButtonChecked&quot;</span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-identifier">c_IsDlgButtonChecked</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">ButtonState</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- == ComboBoxes aka. pop up list boxes/selectors.</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-identifier">cBS_SIMPLE</span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-100"></span><span class="hs-identifier">cBS_SIMPLE</span><span>            </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-101"></span><span class="hs-identifier">cBS_DROPDOWN</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-102"></span><span class="hs-identifier">cBS_DROPDOWN</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-103"></span><span class="hs-identifier">cBS_DROPDOWNLIST</span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-104"></span><span class="hs-identifier">cBS_DROPDOWNLIST</span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">3</span><span>
</span><span id="line-105"></span><span class="hs-identifier">cBS_OWNERDRAWFIXED</span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-106"></span><span class="hs-identifier">cBS_OWNERDRAWFIXED</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">16</span><span>
</span><span id="line-107"></span><span class="hs-identifier">cBS_OWNERDRAWVARIABLE</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-108"></span><span class="hs-identifier">cBS_OWNERDRAWVARIABLE</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">32</span><span>
</span><span id="line-109"></span><span class="hs-identifier">cBS_AUTOHSCROLL</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-110"></span><span class="hs-identifier">cBS_AUTOHSCROLL</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">64</span><span>
</span><span id="line-111"></span><span class="hs-identifier">cBS_OEMCONVERT</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-112"></span><span class="hs-identifier">cBS_OEMCONVERT</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">128</span><span>
</span><span id="line-113"></span><span class="hs-identifier">cBS_SORT</span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-114"></span><span class="hs-identifier">cBS_SORT</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">256</span><span>
</span><span id="line-115"></span><span class="hs-identifier">cBS_HASSTRINGS</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-116"></span><span class="hs-identifier">cBS_HASSTRINGS</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">512</span><span>
</span><span id="line-117"></span><span class="hs-identifier">cBS_NOINTEGRALHEIGHT</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-118"></span><span class="hs-identifier">cBS_NOINTEGRALHEIGHT</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1024</span><span>
</span><span id="line-119"></span><span class="hs-identifier">cBS_DISABLENOSCROLL</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-120"></span><span class="hs-identifier">cBS_DISABLENOSCROLL</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2048</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-pragma">{-# LINE 112 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-identifier">createComboBox</span><span>
</span><span id="line-114"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ComboBoxStyle</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-118"></span><span class="hs-identifier">createComboBox</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">cstyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateComboBox&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">comboBoxStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">cstyle</span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>      </span><span class="hs-identifier">parent</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-identifier">comboBoxStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-126"></span><span class="hs-identifier">comboBoxStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;COMBOBOX&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- see comment about freeing windowNames in System.Win32.Window.createWindow</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- %end free(nm)</span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="hs-comment">--- == Edit controls</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">EditStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-identifier">eS_LEFT</span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-139"></span><span class="hs-identifier">eS_LEFT</span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-140"></span><span class="hs-identifier">eS_CENTER</span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-141"></span><span class="hs-identifier">eS_CENTER</span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-142"></span><span class="hs-identifier">eS_RIGHT</span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-143"></span><span class="hs-identifier">eS_RIGHT</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-144"></span><span class="hs-identifier">eS_MULTILINE</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-145"></span><span class="hs-identifier">eS_MULTILINE</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-146"></span><span class="hs-identifier">eS_UPPERCASE</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-147"></span><span class="hs-identifier">eS_UPPERCASE</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-148"></span><span class="hs-identifier">eS_LOWERCASE</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-149"></span><span class="hs-identifier">eS_LOWERCASE</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">16</span><span>
</span><span id="line-150"></span><span class="hs-identifier">eS_PASSWORD</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-151"></span><span class="hs-identifier">eS_PASSWORD</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">32</span><span>
</span><span id="line-152"></span><span class="hs-identifier">eS_AUTOVSCROLL</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-153"></span><span class="hs-identifier">eS_AUTOVSCROLL</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">64</span><span>
</span><span id="line-154"></span><span class="hs-identifier">eS_AUTOHSCROLL</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-155"></span><span class="hs-identifier">eS_AUTOHSCROLL</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">128</span><span>
</span><span id="line-156"></span><span class="hs-identifier">eS_NOHIDESEL</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-157"></span><span class="hs-identifier">eS_NOHIDESEL</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">256</span><span>
</span><span id="line-158"></span><span class="hs-identifier">eS_OEMCONVERT</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-159"></span><span class="hs-identifier">eS_OEMCONVERT</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1024</span><span>
</span><span id="line-160"></span><span class="hs-identifier">eS_READONLY</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-161"></span><span class="hs-identifier">eS_READONLY</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2048</span><span>
</span><span id="line-162"></span><span class="hs-identifier">eS_WANTRETURN</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-163"></span><span class="hs-identifier">eS_WANTRETURN</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4096</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# LINE 153 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-identifier">createEditWindow</span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">EditStyle</span><span>
</span><span id="line-156"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-158"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-159"></span><span class="hs-identifier">createEditWindow</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">estyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-161"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateEditWindow&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">editStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">estyle</span><span class="hs-special">)</span><span>
</span><span id="line-163"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>      </span><span class="hs-identifier">parent</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-identifier">editStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-167"></span><span class="hs-identifier">editStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;EDIT&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- see comment about freeing windowNames in System.Win32.Window.createWindow</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- %end free(nm)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="hs-comment">-- == List boxes</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="hs-identifier">lBS_NOTIFY</span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-180"></span><span class="hs-identifier">lBS_NOTIFY</span><span>            </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-181"></span><span class="hs-identifier">lBS_SORT</span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-182"></span><span class="hs-identifier">lBS_SORT</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-183"></span><span class="hs-identifier">lBS_NOREDRAW</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-184"></span><span class="hs-identifier">lBS_NOREDRAW</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-185"></span><span class="hs-identifier">lBS_MULTIPLESEL</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-186"></span><span class="hs-identifier">lBS_MULTIPLESEL</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-187"></span><span class="hs-identifier">lBS_OWNERDRAWFIXED</span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-188"></span><span class="hs-identifier">lBS_OWNERDRAWFIXED</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">16</span><span>
</span><span id="line-189"></span><span class="hs-identifier">lBS_OWNERDRAWVARIABLE</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-190"></span><span class="hs-identifier">lBS_OWNERDRAWVARIABLE</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">32</span><span>
</span><span id="line-191"></span><span class="hs-identifier">lBS_HASSTRINGS</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-192"></span><span class="hs-identifier">lBS_HASSTRINGS</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">64</span><span>
</span><span id="line-193"></span><span class="hs-identifier">lBS_USETABSTOPS</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-194"></span><span class="hs-identifier">lBS_USETABSTOPS</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">128</span><span>
</span><span id="line-195"></span><span class="hs-identifier">lBS_NOINTEGRALHEIGHT</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-196"></span><span class="hs-identifier">lBS_NOINTEGRALHEIGHT</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">256</span><span>
</span><span id="line-197"></span><span class="hs-identifier">lBS_MULTICOLUMN</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-198"></span><span class="hs-identifier">lBS_MULTICOLUMN</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">512</span><span>
</span><span id="line-199"></span><span class="hs-identifier">lBS_WANTKEYBOARDINPUT</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-200"></span><span class="hs-identifier">lBS_WANTKEYBOARDINPUT</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1024</span><span>
</span><span id="line-201"></span><span class="hs-identifier">lBS_DISABLENOSCROLL</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-202"></span><span class="hs-identifier">lBS_DISABLENOSCROLL</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4096</span><span>
</span><span id="line-203"></span><span class="hs-identifier">lBS_STANDARD</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-204"></span><span class="hs-identifier">lBS_STANDARD</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">10485763</span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="hs-pragma">{-# LINE 194 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="hs-identifier">createListBox</span><span>
</span><span id="line-196"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ListBoxStyle</span><span>
</span><span id="line-197"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-198"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-200"></span><span class="hs-identifier">createListBox</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">lstyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateListBox&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-203"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">listBoxStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">lstyle</span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>      </span><span class="hs-identifier">parent</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-identifier">listBoxStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-208"></span><span class="hs-identifier">listBoxStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;LISTBOX&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span class="hs-comment">-- see comment about freeing windowNames in System.Win32.Window.createWindow</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- %end free(nm)</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span class="hs-comment">-- == Scrollbars</span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-identifier">sBS_HORZ</span><span>                      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-221"></span><span class="hs-identifier">sBS_HORZ</span><span>                      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-222"></span><span class="hs-identifier">sBS_TOPALIGN</span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-223"></span><span class="hs-identifier">sBS_TOPALIGN</span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-224"></span><span class="hs-identifier">sBS_BOTTOMALIGN</span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-225"></span><span class="hs-identifier">sBS_BOTTOMALIGN</span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-226"></span><span class="hs-identifier">sBS_VERT</span><span>                      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-227"></span><span class="hs-identifier">sBS_VERT</span><span>                      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-228"></span><span class="hs-identifier">sBS_LEFTALIGN</span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-229"></span><span class="hs-identifier">sBS_LEFTALIGN</span><span>                 </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-230"></span><span class="hs-identifier">sBS_RIGHTALIGN</span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-231"></span><span class="hs-identifier">sBS_RIGHTALIGN</span><span>                </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-232"></span><span class="hs-identifier">sBS_SIZEBOX</span><span>                   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-233"></span><span class="hs-identifier">sBS_SIZEBOX</span><span>                   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-234"></span><span class="hs-identifier">sBS_SIZEBOXTOPLEFTALIGN</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-235"></span><span class="hs-identifier">sBS_SIZEBOXTOPLEFTALIGN</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-236"></span><span class="hs-identifier">sBS_SIZEBOXBOTTOMRIGHTALIGN</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-237"></span><span class="hs-identifier">sBS_SIZEBOXBOTTOMRIGHTALIGN</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="hs-pragma">{-# LINE 231 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-identifier">createScrollbar</span><span>
</span><span id="line-233"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ScrollbarStyle</span><span>
</span><span id="line-234"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-237"></span><span class="hs-identifier">createScrollbar</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">sstyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-238"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-239"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateScrollbar&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-240"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">scrollBarStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">sstyle</span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>      </span><span class="hs-identifier">parent</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="hs-identifier">scrollBarStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-245"></span><span class="hs-identifier">scrollBarStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;SCROLLBAR&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span class="hs-comment">-- see comment about freeing windowNames in System.Win32.Window.createWindow</span><span>
</span><span id="line-248"></span><span class="hs-comment">-- %end free(nm)</span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="hs-comment">-- == Static controls aka. labels</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WindowStyle</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-identifier">sS_LEFT</span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-258"></span><span class="hs-identifier">sS_LEFT</span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-259"></span><span class="hs-identifier">sS_CENTER</span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-260"></span><span class="hs-identifier">sS_CENTER</span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-261"></span><span class="hs-identifier">sS_RIGHT</span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-262"></span><span class="hs-identifier">sS_RIGHT</span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-263"></span><span class="hs-identifier">sS_ICON</span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-264"></span><span class="hs-identifier">sS_ICON</span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">3</span><span>
</span><span id="line-265"></span><span class="hs-identifier">sS_BLACKRECT</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-266"></span><span class="hs-identifier">sS_BLACKRECT</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-267"></span><span class="hs-identifier">sS_GRAYRECT</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-268"></span><span class="hs-identifier">sS_GRAYRECT</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">5</span><span>
</span><span id="line-269"></span><span class="hs-identifier">sS_WHITERECT</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-270"></span><span class="hs-identifier">sS_WHITERECT</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">6</span><span>
</span><span id="line-271"></span><span class="hs-identifier">sS_BLACKFRAME</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-272"></span><span class="hs-identifier">sS_BLACKFRAME</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">7</span><span>
</span><span id="line-273"></span><span class="hs-identifier">sS_GRAYFRAME</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-274"></span><span class="hs-identifier">sS_GRAYFRAME</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-275"></span><span class="hs-identifier">sS_WHITEFRAME</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-276"></span><span class="hs-identifier">sS_WHITEFRAME</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">9</span><span>
</span><span id="line-277"></span><span class="hs-identifier">sS_SIMPLE</span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-278"></span><span class="hs-identifier">sS_SIMPLE</span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">11</span><span>
</span><span id="line-279"></span><span class="hs-identifier">sS_LEFTNOWORDWRAP</span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-280"></span><span class="hs-identifier">sS_LEFTNOWORDWRAP</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">12</span><span>
</span><span id="line-281"></span><span class="hs-identifier">sS_NOPREFIX</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-282"></span><span class="hs-identifier">sS_NOPREFIX</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">128</span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-pragma">{-# LINE 272 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="hs-identifier">createStaticWindow</span><span>
</span><span id="line-274"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">WindowStyle</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">StaticControlStyle</span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">Pos</span><span>
</span><span id="line-276"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Maybe</span><span> </span><span class="hs-identifier">HMENU</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HANDLE</span><span>
</span><span id="line-277"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HWND</span><span>
</span><span id="line-278"></span><span class="hs-identifier">createStaticWindow</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-identifier">sstyle</span><span> </span><span class="hs-identifier">mb_x</span><span> </span><span class="hs-identifier">mb_y</span><span> </span><span class="hs-identifier">mb_w</span><span> </span><span class="hs-identifier">mb_h</span><span> </span><span class="hs-identifier">parent</span><span> </span><span class="hs-identifier">mb_menu</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-identifier">withTString</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-identifier">failIfNull</span><span> </span><span class="hs-string">&quot;CreateStaticWindow&quot;</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-281"></span><span>    </span><span class="hs-identifier">c_CreateWindowEx</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-identifier">staticStyle</span><span> </span><span class="hs-identifier">c_nm</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">wstyle</span><span> </span><span class="hs-operator">.|.</span><span> </span><span class="hs-identifier">sstyle</span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_x</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_y</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_w</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePos</span><span> </span><span class="hs-identifier">mb_h</span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>      </span><span class="hs-identifier">parent</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">maybePtr</span><span> </span><span class="hs-identifier">mb_menu</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">h</span><span> </span><span class="hs-identifier">nullPtr</span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-identifier">staticStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ClassName</span><span>
</span><span id="line-286"></span><span class="hs-identifier">staticStyle</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">unsafePerformIO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">newTString</span><span> </span><span class="hs-string">&quot;STATIC&quot;</span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-comment">-- see comment about freeing windowNames in System.Win32.Window.createWindow</span><span>
</span><span id="line-289"></span><span class="hs-comment">-- %end free(nm)</span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="hs-pragma">{-# LINE 333 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span class="hs-identifier">pBM_DELTAPOS</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WindowMessage</span><span>
</span><span id="line-335"></span><span class="hs-identifier">pBM_DELTAPOS</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1027</span><span>
</span><span id="line-336"></span><span class="hs-identifier">pBM_SETPOS</span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WindowMessage</span><span>
</span><span id="line-337"></span><span class="hs-identifier">pBM_SETPOS</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1026</span><span>
</span><span id="line-338"></span><span class="hs-identifier">pBM_SETRANGE</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WindowMessage</span><span>
</span><span id="line-339"></span><span class="hs-identifier">pBM_SETRANGE</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1025</span><span>
</span><span id="line-340"></span><span class="hs-identifier">pBM_SETSTEP</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WindowMessage</span><span>
</span><span id="line-341"></span><span class="hs-identifier">pBM_SETSTEP</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1028</span><span>
</span><span id="line-342"></span><span class="hs-identifier">pBM_STEPIT</span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WindowMessage</span><span>
</span><span id="line-343"></span><span class="hs-identifier">pBM_STEPIT</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1029</span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="hs-pragma">{-# LINE 341 &quot;libraries\\Win32\\Graphics\\Win32\\Control.hsc&quot; #-}</span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span class="hs-comment">-- % , PBM_GETRANGE</span><span>
</span><span id="line-343"></span><span class="hs-comment">-- % , PBM_GETPOS</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- % , PBM_SETBARCOLOR</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- % , PBM_SETBKCOLOR</span><span>
</span><span id="line-346"></span><span class="hs-comment">-- % , PBM_SETRANGE32</span><span>
</span><span id="line-347"></span></pre></body></html>